package com.caigou.mapper.bid;

import com.caigou.bean.bid.entity.Region;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface RegionMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(Region record);

    int insertSelective(Region record);

    Region selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(Region record);

    int updateByPrimaryKey(Region record);

    List<Region> findAllProvince();

    List<Region> findRegionByParentCode(@Param("level") Integer level, @Param("parentCode") String parentCode);
    
    List<Region> findRegionByRegionCodes(@Param("regions") List<String> regions);
    
    Region getRegionByRegionCode(@Param("regionCode") String regionCode);


    List<Region> findProvinceAndCityByRegionLevel(@Param("levels") List<Integer> levels);
}
